Skip to content

feat(job): Enhance mount flag to pass additional mount options for gcsfuse mounts#6005

Open
Neelabh94 wants to merge 8 commits into
GoogleCloudPlatform:developfrom
Neelabh94:gcs-mount-options
Open

feat(job): Enhance mount flag to pass additional mount options for gcsfuse mounts#6005
Neelabh94 wants to merge 8 commits into
GoogleCloudPlatform:developfrom
Neelabh94:gcs-mount-options

Conversation

@Neelabh94

@Neelabh94 Neelabh94 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds support for passing custom mount options when submitting a job, bringing gcluster into closer parity with xpk behavior.

Key Changes:

  • Added options key to the mount flag: Users can now pass custom storage options (e.g., logging:severity:info,enable-atomic-rename-object:true) to gcluster job submit.
  • Added Validation: Included a run validation step that ensures the options key is currently only utilized for GCS fuse volumes (i.e. it enforces that all supplied --mount values start with gs:// when options are present).
  • Updated Documentation: Added the new flag and usage examples to the docs/gcluster_job_guide.md.

@Neelabh94 Neelabh94 self-assigned this Jul 23, 2026
@Neelabh94 Neelabh94 added the release-improvements Added to release notes under the "Improvements" heading. label Jul 23, 2026
@Neelabh94

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new --mount-options flag to the gcluster job submit command, enabling custom mount options for GCS fuse volumes, and updates the orchestrator, GKE storage manager, and documentation accordingly. The review feedback suggests enhancing validation to fail-fast if --mount-options is specified without any mounts, and formatting struct fields in pkg/orchestrator/orchestrator.go to comply with standard Go alignment.

Comment thread cmd/job/submit.go Outdated
Comment thread pkg/orchestrator/orchestrator.go Outdated
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the gcluster CLI by enabling custom mount options for GCS fuse volumes, improving parity with other Google Cloud job submission tools. The changes include adding the necessary CLI flag, implementing strict validation to prevent misuse with non-GCS volumes, and updating the orchestration layer to pass these options through to the GKE CSI driver.

Highlights

  • New CLI Flag: Introduced the --mount-options flag to gcluster job submit to allow users to pass custom configuration options for GCS fuse volumes.
  • Validation Logic: Added a validation step to ensure that the --mount-options flag is only applied when mounting GCS buckets (gs://).
  • Orchestration Updates: Updated the GKE storage manager and job definition types to propagate and apply these mount options to the underlying CSI driver.
  • Documentation: Updated the GCluster job guide with usage examples and details regarding the new flag.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new --mount-options flag to the gcluster job submit command, enabling custom mount options for GCS fuse volumes, and updates the relevant documentation. Feedback suggests adding a validation check to ensure --mount-options is not silently ignored when no mounts are specified, and formatting the JobDefinition struct to align the new field according to standard Go guidelines.

Comment thread cmd/job/submit.go Outdated
Comment thread pkg/orchestrator/orchestrator.go Outdated
@Neelabh94
Neelabh94 marked this pull request as ready for review July 23, 2026 08:49
@Neelabh94
Neelabh94 requested a review from a team as a code owner July 23, 2026 08:49
Comment thread cmd/job/submit.go Outdated

@agrawalkhushi18 agrawalkhushi18 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Neelabh94 Neelabh94 changed the title feat(job): new flag to pass additional mount options for gcsfuse mounts feat(job): Enhance mount flag to pass additional mount options for gcsfuse mounts Jul 24, 2026
@Neelabh94
Neelabh94 marked this pull request as draft July 24, 2026 05:46
@Neelabh94

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the volume mount format from using colons to semicolons (<src>;<dest>[;<mode>][;options=<options>]) to support custom mount options, particularly for GCS fuse volumes. The changes span the CLI flags, documentation, orchestrator storage manager, and associated tests. Feedback points out a critical issue where using StringSliceVar for the --mount flag will incorrectly split comma-separated mount options, and suggests switching to StringArrayVar. Additionally, recommendations are made to simplify the MountInfo initialization in storage.go and to add a test case verifying the parsing of multiple comma-separated options.

Comment thread cmd/job/submit.go Outdated
Comment thread pkg/orchestrator/gke/storage.go
Comment thread pkg/orchestrator/gke/storage_test.go
@Neelabh94

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the --mount flag format from colon-separated (:) to semicolon-separated (;) and adds support for custom mount options (e.g., options=<options>) specifically for GCS fuse volumes. The changes include updates to CLI flags, volume parsing logic, Kubernetes manifest generation, documentation, and unit tests. I have no feedback to provide as the implementation is robust and complete.

@Neelabh94
Neelabh94 marked this pull request as ready for review July 24, 2026 07:52
@Neelabh94
Neelabh94 force-pushed the gcs-mount-options branch from 9a2bbb3 to c5c7732 Compare July 24, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-improvements Added to release notes under the "Improvements" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants